/*
编写 : Hexh
时间 : 2012-11-27 14:38:42
*/
using System;
using System.Collections.Generic;
using FSBS.Core.Entity;
using FSBS.Core.Entity.IRespositories;
using HMIS.FrameWork;
using HMIS.FrameWork.DomainBase;

namespace FSBS.Facade.Impl
{
	/// <summary>
	///	 the impl of IFsbsQmTrsfFacade
	/// </summary>
	public class FsbsQmTrsfFacadeImpl : IFsbsQmTrsfFacade
	{

		private readonly IFsbsQmTrsfRepository FsbsQmTrsfRepository;

		public FsbsQmTrsfFacadeImpl(IFsbsQmTrsfRepository FsbsQmTrsfRepository)
		{
			this.FsbsQmTrsfRepository = FsbsQmTrsfRepository;
		}

		#region IFsbsQmTrsf Entity Save,Get,Update,Delete

		public FsbsQmTrsf Get(string id)
		{
			return FsbsQmTrsfRepository.Get(id);
		}

		public FsbsQmTrsf Load(string id)
		{
			return FsbsQmTrsfRepository.Load(id);
		}

		public void SaveOrUpdate(FsbsQmTrsf entity)
		{
			this.FsbsQmTrsfRepository.SaveOrUpdate(entity);
		}

		public void Delete(string id)
		{
			FsbsQmTrsfRepository.Delete(id);
		}

		public void PhysicsDelete(string id)
		{
			FsbsQmTrsfRepository.PhysicsDelete(id);
		}

		public bool IsFieldExist(string fieldName, string fieldValue, string id)
		{
			return FsbsQmTrsfRepository.IsFieldExist(fieldName, fieldValue, id);
		}

		public bool IsFieldExistWhere(string fieldName, string fieldValue, string id, string where)
		{
			return FsbsQmTrsfRepository.IsFieldExistWhere(fieldName, fieldValue, id, where);
		}

		#endregion

		#region Query

		public IList<FsbsQmTrsf> GetAll()
		{
			return FsbsQmTrsfRepository.GetAll();
		}

		public IList<FsbsQmTrsf> GetPlist(string query, int start, int limit, string sort, string dir, List<DataFilter> filters, out long total)
		{
			return FsbsQmTrsfRepository.GetPlist(query, start, limit, sort, dir, filters, out total);
		}

		public IList<FsbsQmCrif> GetTrsfCarlist(string Trsfid, int start, int limit, string sort, string dir, List<DataFilter> filters, out long total)
		{
			return this.FsbsQmTrsfRepository.GetTrsfCarlist(Trsfid, start, limit, sort, dir, filters, out total);
		}

		#endregion
	}
}
